<template>
  <div class="mail" v-if="$store.state.edit.row">
    <div class="title">{{m($store.state.edit.row.title)}}</div>
    <div class="date">Received on {{$store.state.edit.row.cdate}}</div>
    <div class="content" v-html="$store.state.edit.row.content"></div>
  </div>
</template>

<script>
import {m} from "@/store/yg/common/local"
import {ajax} from '@/store/yg/common/utils'

export default {
  data() {
    return {
      selected: []
    }
  },
  methods: {
    m(k) {
      return m(k);
    },
    opened() {
      if (this.$route.params.id) {
        return;
      }
      var data = {};
      data['id'] = this.$store.state.edit.row.id;
      ajax('markRead', data).then(res => {
      }, error => {
        console.log(error);
      });
    }
  }
}
</script>

<style>
.mail {
  text-align: left;
}
.title {
  font-size: 1.325rem;
  font-weight: 600;
  margin: 0;
  padding: 0;
}
.date {
    font-size: 1rem;
    font-weight: 600;
    color: #8f93ae;
    line-height: 1.8;
    margin-bottom: 20px;
}
.content {
    font-size: 1rem;
    font-weight: 400;
    color: #666872;
    line-height: 1.8;
    font-style: normal;
    padding: 0;
    margin: 0;
    position: relative;
}
</style>
